package com.jumi.microservice.order.convert;

import com.jumi.microservice.common.base.dto.BaseRequest;
import com.jumi.microservice.common.base.dto.BaseResponse;
import com.jumi.microservice.order.context.TransHandlerContext;

/**
 * @author Dirk
 * @Date 2020-08-04 17:17
 */
public interface TransConvert {

    /**
     * 将请求转换为上下文
     *
     * @param request
     * @return
     */
    TransHandlerContext convertRequest2Ctx(BaseRequest request);

    /**
     * 将上下文转换为response
     *
     * @param ctx
     * @return
     */
    BaseResponse convertCtx2Response(TransHandlerContext ctx);
}
